package org.wyz.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wyz.domain.Role;
import org.wyz.mapper.RolesMapper;

import java.util.List;

/**
 * Created by qinyg on 2018/1/24.
 */
@RestController
@EnableAutoConfiguration
public class RoleController {

    @Autowired
    RolesMapper rolesMapper;

    @GetMapping(value = "/roles")
    List<Role> getAllRole() {
        return rolesMapper.selectAllRole();
    }
}
